#ifndef __IPACKAGEMANAGER_H__
#define __IPACKAGEMANAGER_H__

#include "CTypes.h"
#include "IPackage.h"

#define PACKAGE_FILE_NOT_FOUND			-1
#define NOT_VALID_ID_PACKAGE			-2
#define PACKAGE_WANTS_EXIT				1
#define PACKAGE_NORMAL_CONTINUE			2
#define PACKAGE_OPERATION_CORRECT		0

class IPackageManager
{
public:
	IPackageManager()					{}
	virtual ~IPackageManager()			{}

	virtual s32 LoadPackagesFromFile(stringc File)					= 0;
	virtual IPackage *GetPackageForId(s32 Id)						= 0;
	virtual s32 UpdateAllPackages()									= 0;
	virtual s32 LoadNewPackage(stringc FileName)					= 0;
	virtual s32 StartPackage(s32 IdPackage)							= 0;
	virtual s32 UpdatePackage(s32 IdPackage)						= 0;
	virtual s32 PausePackage(s32 IdPackage)							= 0;
	virtual s32 StopPackage(s32 IdPackage)							= 0;
	virtual s32 DestroyPackage(s32 IdPackage)						= 0;

	virtual s32 ShowPackageDetails(s32 IdPackage)					= 0;
};

POWERLIBRARYENGINE_API IPackageManager *GetPackageManager();
POWERLIBRARYENGINE_API void DeletePackageManager();
void SetPackageManager(IPackageManager *ntm);
#define PackageManager	GetPackageManager()

#endif
